<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="AssetData,camo.data.AssetData,baseURL,data,sheetBaseURL,sheets,totalPages,addListeners,getAssetData,getPage,hasAsset,init,ioError,loadComplete,loadTemplate,removeListeners" name="keywords">
<title>camo.data.AssetData</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'AssetData - My Application';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?camo/data/AssetData.html&amp;camo/data/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;AssetData</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class AssetData"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">camo.data</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AssetData</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AssetData <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
<p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#baseURL">baseURL</a> : String<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#data">data</a> : XML<div class="summaryTableDescription">
   
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#sheetBaseURL">sheetBaseURL</a> : String<div class="summaryTableDescription">[read-only]
   
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#sheets">sheets</a> : XMLList<div class="summaryTableDescription">[read-only]
   <p>Returns a list of all the sheets supplied by the XML.</p>
   
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#totalPages">totalPages</a> : Number<div class="summaryTableDescription">[read-only]
   <p>Returns the total number of pages (sheets) supplied in the xml 
   template.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#AssetData()">AssetData</a>(newData:XML = null)</div>
<div class="summaryTableDescription">
   <p>This class handles loading XML data needed to generate Asset sheets 
   and Asset cutouts.</div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addListeners()">addListeners</a>(target:EventDispatcher):void</div>
<div class="summaryTableDescription">
   <p>Adds event listeners to the loader.</p>
   
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getAssetData()">getAssetData</a>(name:String):<a href="../models/AssetModel.html">AssetModel</a>
</div>
<div class="summaryTableDescription">
   <p>This function creates a asset config object for the AssetSheet.</p>
   
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getPage()">getPage</a>(id:Number):XML</div>
<div class="summaryTableDescription">
   <p>Returns XML data on a sheet based on the ID passed in.</div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#hasAsset()">hasAsset</a>(name:String):Boolean</div>
<div class="summaryTableDescription">
   <p>Validates that the Asset Exists in the xml Template.</div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ioError()">ioError</a>(event:IOErrorEvent):void</div>
<div class="summaryTableDescription">
   <p>This function is called when an IO Error is caught.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#loadComplete()">loadComplete</a>(event:Event):void</div>
<div class="summaryTableDescription">
   <p>When the template xml is done loading the raw data is saved into a 
   variable called data for use elsewhere in the class.</div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#loadTemplate()">loadTemplate</a>(url:String):void</div>
<div class="summaryTableDescription">
   <p>When load template is called, it will attempt to load up the xml 
   template data from the supplied url.</div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeListeners()">removeListeners</a>(target:EventDispatcher):void</div>
<div class="summaryTableDescription">
   <p>Removes event listeners from the loader.</p>
   
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#init()">init</a>():void</div>
<div class="summaryTableDescription">
   <p>Init sets up a new loader.</p>
   </div>
</td><td class="summaryTableOwnerCol">AssetData</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="baseURL"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">baseURL</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>baseURL:String</code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get baseURL():String</code>
<br>
</div>
<a name="data"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">data</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>data:XML</code>&nbsp;&nbsp;[read-write]<p>
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get data():XML</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set data(value:XML):void</code>
<br>
</div>
<a name="sheetBaseURL"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sheetBaseURL</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>sheetBaseURL:String</code>&nbsp;&nbsp;[read-only]<p>
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get sheetBaseURL():String</code>
<br>
</div>
<a name="sheets"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sheets</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>sheets:XMLList</code>&nbsp;&nbsp;[read-only]<p>
   </p><p>Returns a list of all the sheets supplied by the XML.</p>
   
   <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get sheets():XMLList</code>
<br>
</div>
<a name="totalPages"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">totalPages</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>totalPages:Number</code>&nbsp;&nbsp;[read-only]<p>
   </p><p>Returns the total number of pages (sheets) supplied in the xml 
   template.</p>
   <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get totalPages():Number</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="AssetData()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">AssetData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function AssetData(newData:XML = null)</code><p>
   </p><p>This class handles loading XML data needed to generate Asset sheets 
   and Asset cutouts.
   Once you instantiate it you can ask it to load a new xml template. A 
   template includes 2 main nodes, one for sheets and one for assets. Sheets 
   are paths to external files used as cut out templates. The asset defines 
   the x,y,w,h to cut out the graphic from it's sheet. This class helps 
   facilitate creating Assets by generating the AssetModel class from the 
   loaded xml data.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">newData</span>:XML</code> (default = <code>null</code>)<code></code> &mdash; xml used to create the Asset. This data is the base
   model of the class.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addListeners()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addListeners(target:EventDispatcher):void</code><p>
   </p><p>Adds event listeners to the loader.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:EventDispatcher</code> &mdash; EventDisplater that events should be added to.
   </td>
</tr>
</table>
</div>
<a name="getAssetData()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getAssetData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getAssetData(name:String):<a href="../models/AssetModel.html">AssetModel</a></code><p>
   </p><p>This function creates a asset config object for the AssetSheet.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; used to look up the asset's data
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../models/AssetModel.html">AssetModel</a></code></td>
</tr>
</table>
</div>
<a name="getPage()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getPage</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getPage(id:Number):XML</code><p>
   </p><p>Returns XML data on a sheet based on the ID passed in. This is 
   used when preloading the list of pages.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">id</span>:Number</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>XML</code></td>
</tr>
</table>
</div>
<a name="hasAsset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">hasAsset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function hasAsset(name:String):Boolean</code><p>
   </p><p>Validates that the Asset Exists in the xml Template. This uses a 
   e4x search to see if the a node with an ID matching the name exists.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; of the Asset to look up.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="init()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">init</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function init():void</code><p>
   </p><p>Init sets up a new loader.</p>
   </div>
<a name="ioError()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ioError</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function ioError(event:IOErrorEvent):void</code><p>
   </p><p>This function is called when an IO Error is caught.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:IOErrorEvent</code></td>
</tr>
</table>
</div>
<a name="loadComplete()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">loadComplete</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function loadComplete(event:Event):void</code><p>
   </p><p>When the template xml is done loading the raw data is saved into a 
   variable called data for use elsewhere in the class. Sheets are pulled 
   out of the data for use by the AssetSheet. Once the xml data is in the 
   right place a CHANGE event is fired and the listeners are removed.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code> &mdash; comes in from loader signaling that the load was successful
   </td>
</tr>
</table>
</div>
<a name="loadTemplate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">loadTemplate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function loadTemplate(url:String):void</code><p>
   </p><p>When load template is called, it will attempt to load up the xml 
   template data from the supplied url. Once this template is loaded it 
   calls loadComplete. It also adds any event listens needed by passing a 
   reference of the loader over to the addListeners function.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; - url path to the template data xml.
   </td>
</tr>
</table>
</div>
<a name="removeListeners()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeListeners(target:EventDispatcher):void</code><p>
   </p><p>Removes event listeners from the loader.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:EventDispatcher</code> &mdash; EventDisplater that events should be removed from.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
